package com.github.ki4so.sso.repository;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.github.ki4so.sso.mapper.UserMapper;
import com.github.ki4so.sso.model.User;

@Repository
public class UserRepository {
	
	@Autowired
	private UserMapper userMapper;

	public User getByUsernameAndPassword(String username, String password) {
		return userMapper.selectByUsernameAndPassword(username, password);
	}

	public void addUser(User user) {
		userMapper.insert(user);
	}

}
